let Room = function (RoomID) {
	this.RoomID = RoomID;
	this.playerList = [];
	this.checkerBoard = [];
	this.colorList = ["white", "black"];
	this.gaming = false;
	this.turn = "black";
};

Room.prototype.sendMsgToRoomMember = function (type) {
	let roomMembers = [];
	if (this.playerList) {
		this.playerList.forEach((e) => {
			e.playerInfo.info.color = e.color;
			roomMembers.push(e.playerInfo.info);
		});
	}
	let pak = {
		type,
		data: roomMembers,
		isGuangbo: true,
	};
	this.playerList.forEach((e) => {
		e.sendMsg(pak);
	});
};
module.exports = Room;
